﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using BEGDC.CC.Web.UserControls;

namespace BEGDC.CC.Web.Common
{
    /// <summary>
    /// Summary description for CommonQueryReply.
    /// </summary>
    public class CommonQueryReply : System.Web.UI.Page
    {
        protected System.Web.UI.WebControls.TextBox tbComment;
        protected System.Web.UI.WebControls.Button Btn_Confirm;
        protected System.Web.UI.WebControls.Button Btn_Close;

        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
        }

        #region Web Form Designer generated code
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);
        }

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.Btn_Confirm.Click += new EventHandler(Btn_Confirm_Click);
            this.Btn_Close.Click += new EventHandler(Btn_Close_Click);
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion

        void Btn_Close_Click(object sender, EventArgs e)
        {
            Response.Write(@"<Script>returnValue='%close%';self.close(); </Script>");
        }

        void Btn_Confirm_Click(object sender, EventArgs e)
        {
            Response.Write(@"<Script>returnValue='" + WebUtility.EnCodeString(Server, tbComment.Text) + "';self.close(); </Script>");
        }
    }
}
